package cs02;

import java.io.*;
import java.util.Properties;

public class test01 {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();
        FileReader fr = new FileReader("s");
        prop.load(fr);
        fr.close();

        String name = prop.getProperty("name");
        int age = Integer.parseInt(prop.getProperty("age"));
        Student s = new Student(name,age);

        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("D:/abc.txt"));
        oos.writeObject(s);
        oos.close();
    }
}
